package cn.school.thoughtworks.section3;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class PracticeA {
    Map<String,Integer> createUpdatedCollection(Map<String,Integer> collectionA, Map<String,List<String>> object) {
        System.out.println(collectionA);
        List<String> result = object.get("value");
        System.out.println(result);
        for (int i =0;i<result.size();i++){
            String s = result.get(i);
            if(collectionA.containsKey(s)) {
                Integer j = collectionA.get(s);
                collectionA.put(s,j-1);
            }
        }

        return collectionA;
    }
}
